{% extends "aside/erp/base.html" %}
{% load staticfiles %}
{% block custom_tdk %}
    <title>开发基本信息 - WanFeng</title>
    <meta name="description" content="运费计算">
{% endblock %}

{% block page-title %}开发基本信息{% endblock %}

{% block app-footer %}
    <div class="app-footer white bg p-a b-t">
    <div class="pull-right text-sm text-muted"></div>
    <span class="text-sm text-muted">WanFeng &copy; Copyright. Version 4.0.1</span>
</div>
{% endblock %}

{% block app-body %}
    <style>
    .productSKU td{padding: 0;}
    .productSKU td input{border: none;width: 100%;height: 100%;}
    .productSKU td.focus{border-color: #f05050; background-color: #fff;}
    </style>


<div class="padding">
<div class="box">

<div class="row p-a">
    <div class="col-sm-12">
        <div class="box">
            <div class="box-header primary">
                <h3>申报信息</h3>
                </div>
            <div class="box-body">
                <div class="row">
                        <div class="col-md-7">
                            <div class="form-group row">
                                <div class="col-sm-6 m-b-10">
                                    <label for="dNameCN">中文申报名</label><span class="pull-right label" ><a href="#" class="translateDeclareEN">译</a></span>
                                    <input type="text" class="form-control" id="dNameCN" name="dNameCN" placeholder="必填">
                                </div>
                                <div class="col-sm-6 m-b-10">
                                    <label for="dNameEN">英文申报名</label><span class="pull-right label" ><a href="#" class="translateDeclareZH">译</a></span>
                                    <input type="text" class="form-control" id="dNameEN" name="dNameEN" placeholder="必填">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">
                            <div class="form-group row">
                                <div class="col-sm-6 m-b-10">
                                    <label for="dPrice">申报金额</label>
                                    <div class="input-group m-b"><span class="input-group-addon">$</span> <input type="text" id="dPrice" class="form-control inputNumber" value="3"> <span class="input-group-addon">.00</span></div>
                                </div>
                                <div class="col-sm-6 m-b-10">
                                    <label for="dWeight">申报重量</label>
                                    <div class="input-group m-b"><input type="text" id="dWeight" class="form-control inputNumber" value="100"> <span class="input-group-addon">g</span></div>
                                </div>
                            </div>
                        </div>

                </div>

                <h6 class="grey-100 p-a-1">基本信息 </h6>
                <div class="row">
                    <div class="col-md-12">
                            <div class="form-group row">
                                <div class="col-sm-2 m-b-10">
                                    <label for="dCategory">类目</label>
                                    <select name="dCategory" id="dCategory" class="form-control c-select">
                                        <option value="T">T-玩具</option>
                                        <option value="H">H-家居</option>
                                        <option value="C">C-电脑</option>
                                    </select>
                                </div>
                                <div class="col-sm-3 m-b-10">
                                    <label for="skuCode">商品编码 <a href="javascript:;" class="label m-l-1 getSkuCode"><i class="fa fa-refresh"></i> 生成编码</a></label>
                                    <input type="text" class="form-control" id="skuCode" name="skuCode" value="T-{{ skuCode }}" disabled>

                                </div>
                                 <div class="col-sm-3 m-b-10">
                                    <label for="dBrand">品牌</label>
                                    <input type="text" class="form-control" id="dBrand" placeholder="可选" name="dBrand">
                                </div>
                                <div class="col-sm-4 m-b-10">
                                    <label for="dMemo">产品卖点</label>
                                    <input type="text" class="form-control" id="dMemo" placeholder="可选" name="dMemo">
                                </div>
                            </div>
                    </div>

                </div>
                <div class="row">
                    <div class="col-md-7">
                                    <div class="form-group">
                                                        <div class="row">
                                                            <div class="col-sm-3 m-b-10">
                                                                <label for="bedrooms">重量（ g ）</label>
                                                                <input type="text" class="form-control has-value inputNumber" id="Pweight">
                                                            </div>
                                                            <div class="col-sm-3 m-b-10">
                                                                <label for="bedrooms">长（ CM ）</label>
                                                                <input type="text" class="form-control has-value inputNumber" id="Plength">
                                                            </div>
                                                            <div class="col-sm-3 m-b-10">
                                                                <label for="Square-ft">宽（ CM ） </label>
                                                                <input type="text" class="form-control has-value inputNumber" id="Pwidth">
                                                            </div>
                                                            <div class="col-sm-3 m-b-10">
                                                                <label for="car-parking">高（CM）</label>
                                                                <input type="text" class="form-control has-value inputNumber" id="Pheight">
                                                            </div>
                                                        </div>
                                                    </div>
                                </div>
                    <div class="col-md-5">
                        <br/>
                        <br/>
                        <label class="radio-inline">
                                <input type="radio" name="daiDian" value="0" checked class="has-value">
                                不带电</label>
                            <label class="radio-inline">
                                <input type="radio" name="daiDian" value="1" class="has-value">
                                弱电</label>
                            <label class="radio-inline">
                                <input type="radio" name="daiDian" value="2" class="has-value">
                                纽扣电池</label>
                                                        <label class="radio-inline">
                                <input type="radio" name="daiDian" value="3" class="has-value">
                                带磁</label>
                        <button type="button" class="btn white btn-sm m-l-1"><a href="#" class="active" data-ui-toggle-class="">更多信息 <i class="fa fa-angle-double-down text-danger none"></i><i class="fa fa-angle-double-up inline"></i></a></button>

                                </div>
                    <div class="col-md-12">
                        <label for="dNameCN">竞品链接 <code>（＊目前仅支持速卖通平台）</code></label>
                        <div class="form-group row">
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="smtUrl" placeholder="输入速卖通产品URL获取图片">
                        </div>
                            <div class="col-sm-5">

                                <label class="radio-inline">
                                <input type="radio" name="linkPlatform"  value="0" checked class="has-value">
                                速卖通</label>
                            <label class="radio-inline">
                                <input type="radio" name="linkPlatform" disabled value="1" class="has-value">
                                eBay</label>
                            <label class="radio-inline">
                                <input type="radio" name="linkPlatform" disabled value="2" class="has-value">
                                亚马逊</label>
                            <label class="radio-inline">
                                <input type="radio" name="linkPlatform" disabled value="3" class="has-value">
                                Wish</label>
                            <button class="md-btn md-raised m-b-sm info m-l-1 " id="getImgAndSKU">获取主图与SKU信息</button>
                        </div>
                    </div>
                    </div>
                </div>

                <div class="box">
            <div class="box-header grey-100">
                <h3>SKU图片 <span class="pull-right"><button class="btn btn-sm info uplaodImage">增加图片</button></span></h3>
            </div>
            <div class="box-body">
                <div class="row">
                    <div class="col-sm-2">
                        <div class="row" id="skuImgList">

                        </div>
                    </div>
                    <div class="col-sm-10">
                        <div class="table-responsive">
                            <table class="table table-striped b-t">
                                <thead>
                                <tr>
                                    <th>图片</th>
                                    <th>SKU标识码</th>
                                    <th>名称</th>
                                    <th>市场价(USD) <i class="fa fa-copy" id="copySellPrice"></i></th>
                                    <th>采购价(RMB) <i class="fa fa-copy" id="copyPurchasePrice"></i></th>
                                    <th>毛利</th>
                                </tr>
                                </thead>
                                <tbody id="skuListBox">

                                <tr class="skuItem" data-val="1">
                                    <td><img src="/static/aside/images/nopic.png" class="w-48 img-responsive skuImg" data-index="1" /></td>
                                    <td><input type="text" disabled value="T-{{ skuCode }}:1" class="form-control subSukCode" data-index="1" /></td>
                                    <td><input type="text" value="" class="form-control" /></td>
                                    <td><input type="text" value="" class="form-control inputPrice w-xs sellPrice" /></td>
                                    <td><input type="text" value="" class="form-control inputPrice w-xs purchasePrice" /></td>
                                    <td><input type="text" value="" class="form-control w-xs" disabled /></td>
                                </tr>
                                </tbody>

                            </table>
                        </div>
                    </div>

                </div>
            </div>
        </div>

                <h6 class="grey-100 p-a-1">供应商信息 <span class="pull-right label"><a href="#" class="active" data-ui-toggle-class=""><i class="fa fa-angle-double-down none"> 一键获取 </i><i class="fa fa-angle-double-up inline">手动填写 </i></a></span></h6>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group row">
                        <div class="col-sm-7">
                            <input type="text" class="form-control" id="supplierUrl" placeholder="输入供应商产品URL获取图片">
                        </div>
                            <div class="col-sm-5">
                                <label class="radio-inline">
                                <input type="radio" name="linkSuppliers"  value="0" checked class="has-value">
                                1688 </label>
                            <label class="radio-inline">
                                <input type="radio" name="linkSuppliers"  value="1" class="has-value">
                                淘宝网 </label>
                            <label class="radio-inline">
                                <input type="radio" name="linkSuppliers" disabled value="2" class="has-value">
                                京东商城</label>

                            <button class="md-btn md-raised m-b-sm info m-l-1" id="getImgAndSKU">获取供应商与SKU</button>
                        </div>
                    </div>
                    </div>
                </div>





            </div>
        </div>


    </div>


</div>



<div id="modal-uploadImage" class="modal" data-backdrop="true">
    <div class="row-col h-v">
        <div class="row-cell v-m">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h6 class="modal-title">上传图片</h6>
                    </div>
                    <div class="modal-body p-lg row">
                        <div class="col-sm-12">
                            <div class="b-b b-primary nav-active-primary">
                                <ul class="nav nav-tabs">

                                    <li class="nav-item"><a class="nav-link active" href="#" data-toggle="tab" data-target="#tab-upload" aria-expanded="true">手动上传</a></li>
                                    <li class="nav-item"><a class="nav-link" href="#" data-toggle="tab" data-target="#tab-remote" aria-expanded="false">远程图片</a></li>
                                </ul>
                            </div>
                            <div class="tab-content p-a m-b-md">
                                <input type="hidden" name="imgPlace" id="imgPlace" value="None"/>

                                <div class="tab-pane animated fadeIn text-muted active" id="tab-upload" aria-expanded="true">
                                    <form action="/admin/upload/skuimg" id="uploadImgForm" method="post" enctype="multipart/form-data">
                                        <input type="file" name="imgFile" class="form-control"/>

                                    </form>



                                </div>
                                <div class="tab-pane animated fadeIn text-muted" id="tab-remote" aria-expanded="false">
                                    <input type="text" name="remoteImgURL" class="form-control" placeholder="图片URL"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn dark p-x-md" id="uploadBtn">确定</button>
                        <button type="button" class="btn dark-white p-x-md" data-dismiss="modal">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<footer class="light lt p-a">
    <div class="row">


    </div>
</footer>
</div>
</div>

{% endblock %}